package fhp.hlhj.giantfold.module

import com.lzy.okgo.model.HttpParams
import fhp.hlhj.giantfold.javaBean.OrderBean
import fhp.hlhj.giantfold.network.UrlApis

/**
 * Created by Administrator on 2018\2\8 0008.
 */
class OrderDetailModule {
    interface onRespListner{
        fun showLoading()
        fun onRsp(orderBean: OrderBean)
    }

    fun getOrder(params: HttpParams,listener: OrderDetailModule.onRespListner){
        UrlApis.orderDetail(params)
                .doOnSubscribe { listener.showLoading() }
                .subscribe {
                    data->
                    listener.onRsp(data)
                }
    }
}